package main

import "fmt"

//test slice of map
func main() {
	// var monsters []map[string]string
	var monsters = make([]map[string]string, 2)

	if monsters[0] == nil {
		monsters[0] = make(map[string]string, 2)
		monsters[0]["name"] = "牛魔王"
		monsters[0]["age"] = "600"
	}

	if monsters[1] == nil {
		monsters[1] = make(map[string]string, 2)
		monsters[1]["name"] = "铁扇公主"
		monsters[1]["age"] = "500"
	}

	newMonster := map[string]string{
		"name": "新妖怪 黄袍怪",
		"age":  "2000",
	}
	monsters = append(monsters, newMonster)

	fmt.Println(monsters)

}
